<template>
    <div class=" cbox">
        <h4>子路由组件-路径参数</h4>
        {{ $route.query }}
        <input type="button" value="提示参数" @click='showQuery()'>
    </div>
</template>
<!-- <script>


    export default {
        methods:{
            showQuery(){
                alert(this.$route.query.argA+':'+this.$route.query.argB)
            }
        }
    }

</script> -->
<script setup>
     import {useRoute }from 'vue-router'
    const $route=useRoute()
    function showQuery(){
        alert($route.query.argA + ':' + $route.query.argB)
    }

</script>